Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix kotlin verb registry #565

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

worstell
Copy link
Contributor

@worstell worstell commented Nov 7, 2023

The actual bug was in this line. This return statement bailed from the entire registerAll() function, rather than the forEach iteration as intended. The fix is directing the return with return@forEach — the rest of this PR is small cosmetic changes for readability.

This only affected modules compiled when other modules were active in the cluster because those contained generated stubs whose modules were annotated with Ignore, causing this return to execute.

fixes #559

@alecthomas
Copy link
Collaborator

Nice spotting. Pretty sure that was my bad, sorry!

.forEach {
val kClass = it.loadClass().kotlin
if (kClass.hasAnnotation<Ignore>()) {
return@forEach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this magical syntax?!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually it's not necessary but in the odd case comes in handy!

@worstell worstell merged commit ce54482 into main Nov 7, 2023
9 checks passed
@worstell worstell deleted the worstell/20231106-fix-kotlin-verb-registry branch November 7, 2023 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating new modules with ftl init kotlin builds and deploys but errors on call
2 participants